#include <stdio.h>
#include <stdlib.h>

#include "tmpbuf.h"

int main(int argc, char **argv)
{
    tmpbuf_t tb1;
    int ret = tmpbuf_init(&tb1, 128);
    tmpbuf_deinit(&tb1);
    printf("tmpbuf init ret:%d {tmp:0x%x cap:%d buf:0x%x}\n", ret, tb1.tmp, tb1.cap, tb1.buf);
    snprintf(tb1.buf, tb1.cap, "name:%s age:%d sex:%s job:%s home:%s", "luuuuuuuuaka", 22, "boy", "c语言开发", "天桥底");
    printf("tb1.buf: %s\n", tb1.buf);
}